package com.yict.csms.system.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 数据权限组Entity
 * 
 * @author Patrick.Deng
 * 
 */
@Entity
@Table(name = "CSMS_DATAPER")
public class Dataper {

	@Id
	@Column(name = "CWTID")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "csms_cwt_seq")
	@SequenceGenerator(name = "csms_cwt_seq", sequenceName = "SEQ_CSMS_DATAPER", allocationSize = 1, initialValue = 1)
	private Long cwtId;

	@Column(name = "DATAPERMISSION")
	private String datePermission;

	@Column(name = "DATAPERNAME")
	private String datePerName;

	@Column(name = "CREATEDATE")
	private Date createDate;

	@Column(name = "UPDATEDATE")
	private Date updateDate;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATEPERSON", nullable = false)
	private User createPerson;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "UPDATEPERSON", nullable = false)
	private User updatePerson;

	public Long getCwtId() {
		return cwtId;
	}

	public void setCwtId(Long cwtId) {
		this.cwtId = cwtId;
	}

	public String getDatePermission() {
		return datePermission;
	}

	public void setDatePermission(String datePermission) {
		this.datePermission = datePermission;
	}

	public String getDatePerName() {
		return datePerName;
	}

	public void setDatePerName(String datePerName) {
		this.datePerName = datePerName;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public User getCreatePerson() {
		return createPerson;
	}

	public void setCreatePerson(User createPerson) {
		this.createPerson = createPerson;
	}

	public User getUpdatePerson() {
		return updatePerson;
	}

	public void setUpdatePerson(User updatePerson) {
		this.updatePerson = updatePerson;
	}
}
